package com.wsoft.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.wsoft.dto.LogDto;
import com.wsoft.entity.SysLogEntity;
import com.wsoft.manager.SysLogManager;
import com.wsoft.mapper.SysLogMapper;
import com.wsoft.service.ISysLogService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author z001
 * @since 2024年11月18日 17:45:50
 */
@Service
public class SysLogServiceImpl extends ServiceImpl<SysLogMapper, SysLogEntity> implements ISysLogService {

    @Resource
    private SysLogManager logManager;

    /**
     * 分页查询
     * @param query
     * @return
     */
    @Override
    public PageInfo<SysLogEntity> pageList(LogDto query) {
        PageHelper.startPage(query.getPageNum(), query.getPageSize());
        return PageInfo.of(logManager.list(query));
    }
}
